package com.jin.lazytool.listener;

import com.github.kwhat.jnativehook.mouse.NativeMouseEvent;
import com.github.kwhat.jnativehook.mouse.SwingMouseAdapter;
import com.jin.lazytool.entity.MousePressedEvent;
import com.jin.lazytool.entity.MouseReleasedEvent;
import com.jin.lazytool.utils.CurrentStateUtil;

public class MouseClickedListener extends SwingMouseAdapter {

    @Override
    public void nativeMouseClicked(NativeMouseEvent nativeMouseEvent) {
    }

    @Override
    public void nativeMousePressed(NativeMouseEvent nativeMouseEvent) {
        CurrentStateUtil.addEventOfGroup(new MousePressedEvent(nativeMouseEvent));
    }

    @Override
    public void nativeMouseReleased(NativeMouseEvent nativeMouseEvent) {
        CurrentStateUtil.addEventOfGroup(new MouseReleasedEvent(nativeMouseEvent));
    }
}
